/**
 * Commands for saving elements to the ItemManager
 * @author zulianp@lu.unisi.ch & remo.lemma@lu.unisi.ch
 */

package ch.unisi.inf.projects.java.uom.gui.commands;

import java.awt.event.ActionEvent;

import ch.unisi.inf.projects.java.uom.elements.*;

public final class ElementSaveCommand extends Command {
	
	/** We are not going to serialize this class atm */
	private static final long serialVersionUID = -1L;
	
	private final ItemManager manager;
	
    public ElementSaveCommand()
    {
    	super();
    	manager = ItemManager.instance();
    }
    
    public void actionPerformed(final ActionEvent ev)
    {  
    	final Element c = null;
    	try {
    		manager.elementSave(c);
    		fireActionPerformed();
    	}
    	catch (final Exception ex)
    	{
    		ex.printStackTrace();
    		assert false;
    	}
    }
}